﻿/******************************************************   
创建者: 梁家健
创建时间: 2017-03-21
修改:
修改时间: 
功能: 品类数据存储实体
 ******************************************************/

using com.nm.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlanAPI.model
{
    public class PLModelProcessModel
    {
        /// <summary>
        /// 品类数据存储实体
        /// </summary>
        /// Writer：梁家健
        /// Create Date：2017-03-21
        public class CreatModel : NeceModel
        {
            [ParamDescription("配货金额")]
            public decimal? MoveAmount { get; set; }
            [ParamDescription("供货金额")]
            public decimal? SupplyAmount { get; set; }
            [ParamDescription("销售金额")]
            public decimal? SaleAmount { get; set; }
            [ParamDescription("平均配销比")]
            public decimal? AvgMSRate { get; set; }
            [ParamDescription("周更新率(当 MonthOrWeek=0 即为月时，该字段为空)")]
            public decimal? UpdateRate { get; set; }
            [ParamDescription("周更新率(换算)(当 MonthOrWeek=0 即为月时，该字段为空，每个月包含周的更新率汇总再百分比)")]
            public decimal? PtUpdateRate { get; set; }
            [ParamDescription("审核状态")]
            public long? CheckState { get; set; }
            [ParamDescription("审核人")]
            public string Checker { get; set; }
            [ParamDescription("修改时间")]
            public DateTime? MofifyDTM { get; set; }
            [ParamDescription("读取时间")]
            public DateTime? LoadTime { get; set; }
            [ParamDescription("修改时间")]
            public DateTime? EtlDate { get; set; }
        }

        /// <summary>
        /// 品类数据存储主要实体
        /// </summary>
        /// Writer：梁家健
        /// Create Date：2017-03-21
        public class NeceModel
        {
            [ParamDescription("公司")]
            public string CompanyID { get; set; }
            [ParamDescription("年份")]
            public long? Yearv { get; set; }
            [ParamDescription("月/周标记(0 为月，1 为周)")]
            public long? MonthOrWeek { get; set; }
            [ParamDescription("所属月份")]
            public long? Monthv { get; set; }
            [ParamDescription("周")]
            public long? Weekv { get; set; }
            [ParamDescription("零售分区/店铺(0 为零售分区，1 为店铺)")]
            public long? AreaOrShop { get; set; }
            [ParamDescription("零售分区")]
            public string ParentAreaID { get; set; }
            [ParamDescription("店铺ID")]
            public string ShopID { get; set; }
            [ParamDescription("类别")]
            public string KindID { get; set; }
            [ParamDescription("系列")]
            public string SeriesID { get; set; }
            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }
            [ParamDescription("品类")]
            public string ModelID { get; set; }
            [ParamDescription("配货金额占比")]
            public decimal? MoveAmountRate { get; set; }
            [ParamDescription("供货金额占比")]
            public decimal? SupplyAmountRate { get; set; }
            [ParamDescription("销售金额占比")]
            public decimal? SaleAmountRate { get; set; }
            [ParamDescription("配销比")]
            public decimal? MSRate { get; set; }
            [ParamDescription("标准金额占比")]
            public decimal? StandAmountRate { get; set; }
            [ParamDescription("换算百分比(%)")]
            public decimal? CalcStandAmountRate { get; set; }
            [ParamDescription("自动取值(%)")]
            public decimal? PtStandAmountRate { get; set; }
            [ParamDescription("换算(%)")]
            public decimal? AutoStandAmountRate { get; set; }
            [ParamDescription("确认百分比(%)")]
            public decimal? CkPtStandAmountRate { get; set; }
            [ParamDescription("校对计算值(确认标准金额百分比 * 周更新率(换算))")]
            public decimal? CalcCheck { get; set; }
            [ParamDescription("备注")]
            public string Remark { get; set; }
            [ParamDescription("数据源")]
            public string ExtrSource { get; set; }
        }

        /// <summary>
        /// 品类数据存储显示实体
        /// </summary>
        /// Writer：梁家健
        /// Create Date：2017-03-21
        public class ListModel:NeceModel
        {
            [ParamDescription("店铺代码")]
            public string ShopCode { get; set; }
            [ParamDescription("店铺名称")]
            public string ShopName { get; set; }
            [ParamDescription("类别名称")]
            public string KindName { get; set; }
            [ParamDescription("系列名称")]
            public string SeriesName { get; set; }
            [ParamDescription("品类名称")]
            public string ModelName { get; set; }
            [ParamDescription("商品区域名称")]
            public string ParentAreaName { get; set; }
            [ParamDescription("最小值")]
            public decimal? MinRate { get; set; }
            [ParamDescription("最大值")]
            public decimal? MaxRate { get; set; }

            public IList<IGrouping<string,ListModel>> list { get; set; }
        }

        /// <summary>
        /// 品类数据存储修改实体
        /// </summary>
        /// Writer：梁家健
        /// Create Date：2017-03-21
        public class ModifyModel
        {
            [ParamDescription("品类数据存储列表")]
            public IList<NeceModel> list { get; set; }
            [ParamDescription("是否月份")]
            public int isMonth { get; set; }
            [ParamDescription("是否区域")]
            public bool isArea { get; set; }
        }
    }
}
